﻿using System.Web.Routing;
using NUnit.Framework;

namespace MvcShortRoute.Tests
{
    [TestFixture]
    public class ShortRouteTests
    {
        [Test]
        public void Can_Register_Route()
        {
            var routeCollection = new RouteCollection();

            Routes.Register(routeCollection);

            Assert.IsNotEmpty(routeCollection);

            var customUrlRoute = (Route) routeCollection[0];
            var autoUrlRoute = (Route) routeCollection[1];

            Assert.AreEqual("test1", customUrlRoute.Url);
            Assert.AreEqual("welcome", autoUrlRoute.Url);
        }
    }
}